Data processing applications that process streaming data, such as image processing and computer vision applications, demand high bandwidth from memory in order to sustain the high computation workload. Stream descriptors are a set of parameters can be used to describe the shape and location of data elements in a memory so that a stream processor can prefetch, stage, and align data. Stream descriptors can be used to control the action of hardware elements that are configured specifically for computing memory addresses. This reduces the computation load on the processor.
Stream descriptors have been used in partitioned vector processing to describe memory access patterns that exhibit harmonic patterns only. A stream descriptor is represented as a parameter vector (START_ADDRESS, STRIDE, SPAN0, SKIP0, SPAN1, SKIP1, TYPE) where:                START_ADDRESS (SA) represents the memory location of the first data element.        STRIDE is the spacing between two consecutive data elements. This is useful for describing sub-sampling in an image.        SPAN0 is the number of data elements gathered before applying the SKIP0 offset.        SKIP0 is the offset that is applied between groups of SPAN0 data elements.        SPAN1 is the number of data elements gathered before applying the SKIP1 offset.        SKIP1 is the offset that is applied between groups of SPAN1 data elements.        TYPE indicates how many bytes are in each data element, for example TYPE=0 indicates 8-bit pixel values, TYPE=1 indicates 16-bit pixel values, so forth. The terms stream descriptor value and stream parameter can be use interchangeably.        
FIG. 1 shows an example set of stream descriptors. Stream descriptors may be used, for example, to describe the memory pattern for a region of interest (ROI) in a digital image stored in a memory. The stream descriptors express both the shape in memory where the data is stored and the order in which the data elements are to be accessed. Stream descriptors may also be used to describe memory locations and data order for non-image data or used with peripherals in the system.
Compilers have been disclosed with the ability to manipulate the stream descriptors so as to enable memory transfer optimizations. Data prefetching at different levels of the memory hierarchy makes data movement more efficient. A “stream loader” is also described that can insert executable code that evaluates stream descriptor values when they are loaded into the streaming data interface. However, there are no methods to describe the dynamic patterns of the memory access. The parameters for the DMA or streaming data interface calculate relative addressing based on a fixed pattern (i.e. using the previous address and then add/subtract a constant value—skip or stride). Furthermore, this restriction limits performance because of its inability to describe more complex patterns.
Existing stream descriptors are not flexible enough to describe certain memory access patterns, since data shape and location can change dynamically during program execution. Overall system performance becomes limited if the stream descriptor value is static.
Skilled artisans will appreciate that elements in the figures are illustrated for simplicity and clarity and have not necessarily been drawn to scale. For example, the dimensions of some of the elements in the figures may be exaggerated relative to other elements to help to improve understanding of embodiments of the present invention.